home *** CD-ROM | disk | FTP | other *** search
- letterkeys = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
- numberkeys = new Array("0","1","2","3","4","5","6","7","8","9");
- numpadkeys = new Array("0","1","2","3","4","5","6","7","8","9","*","+","Enter","-",".","/");
- functionkeys = new Array("F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12");
- otherkeys = new Array("Space","Page Up","Page Down","End","Home","Left","Up","Right","Down");
- this.setValues = function(pressed, which)
- {
- var p = this;
- if(pressed >= 65 and pressed <= 90)
- {
- p[which] = letterkeys[pressed - 65];
- }
- if(pressed >= 48 and pressed <= 57)
- {
- p[which] = numberkeys[pressed - 48];
- }
- if(pressed >= 96 and pressed <= 111)
- {
- p[which] = numpadkeys[pressed - 96];
- }
- if(pressed >= 112 and pressed <= 123)
- {
- p[which] = functionkeys[pressed - 112];
- }
- if(pressed >= 32 and pressed <= 40)
- {
- p[which] = otherkeys[pressed - 32];
- }
- if(pressed == 8)
- {
- p[which] = "BackSpace";
- }
- if(pressed == 9)
- {
- p[which] = "Tab";
- }
- if(pressed == 12)
- {
- p[which] = "Clear";
- }
- if(pressed == 13)
- {
- p[which] = "Enter";
- }
- if(pressed == 16)
- {
- p[which] = "Shift";
- }
- if(pressed == 17)
- {
- p[which] = "Control";
- }
- if(pressed == 18)
- {
- p[which] = "Alt";
- }
- if(pressed == 20)
- {
- p[which] = "Caps Lock";
- }
- if(pressed == 27)
- {
- p[which] = "Esc";
- }
- if(pressed == 45)
- {
- p[which] = "Insert";
- }
- if(pressed == 46)
- {
- p[which] = "Delete";
- }
- if(pressed == 47)
- {
- p[which] = "help";
- }
- if(pressed == 144)
- {
- p[which] = "Num Lock";
- }
- if(pressed == 186)
- {
- p[which] = ";:";
- }
- if(pressed == 187)
- {
- p[which] = "=+";
- }
- if(pressed == 189)
- {
- p[which] = "-_";
- }
- if(pressed == 191)
- {
- p[which] = "/?";
- }
- if(pressed == 192)
- {
- p[which] = "\'@";
- }
- if(pressed == 219)
- {
- p[which] = "[{";
- }
- if(pressed == 220)
- {
- p[which] = "\\|";
- }
- if(pressed == 221)
- {
- p[which] = "]}";
- }
- p[which + "Name"].autoSize = true;
- if(which == "mKey")
- {
- p.mStatInst._x = p[which + "Name"]._x + p[which + "Name"]._width + 20;
- }
- else if(which == "sKey")
- {
- p.sStatInst._x = p[which + "Name"]._x + p[which + "Name"]._width + 20;
- }
- p._parent.typing = false;
- };
- this.setValues(this._parent.uKey,"uKey");
- this.setValues(this._parent.dKey,"dKey");
- this.setValues(this._parent.pKey,"pKey");
- this.setValues(this._parent.mKey,"mKey");
- this.setValues(this._parent.sKey,"sKey");
- this.releaseFunc = function(which)
- {
- var t = this;
- t.fillBlanks();
- t._parent.typing = true;
- t.selectkey = true;
- t.whichkey = which;
- t[which] = "";
- };
- this.fillBlanks = function()
- {
- var t = this;
- if(t.selectkey == true)
- {
- if(t.whichkey == "uKey")
- {
- t.setValues(t._parent.uKey,"uKey");
- }
- if(t.whichkey == "dKey")
- {
- t.setValues(t._parent.dKey,"dKey");
- }
- if(t.whichkey == "pKey")
- {
- t.setValues(t._parent.pKey,"pKey");
- }
- if(t.whichkey == "mKey")
- {
- t.setValues(t._parent.mKey,"mKey");
- }
- if(t.whichkey == "sKey")
- {
- t.setValues(t._parent.sKey,"sKey");
- }
- }
- };
- this.uKeyInst.onRelease = function()
- {
- this._parent.releaseFunc("uKey");
- };
- this.dKeyInst.onRelease = function()
- {
- this._parent.releaseFunc("dKey");
- };
- this.pKeyInst.onRelease = function()
- {
- this._parent.releaseFunc("pKey");
- };
- this.mKeyInst.onRelease = function()
- {
- this._parent.releaseFunc("mKey");
- };
- this.sKeyInst.onRelease = function()
- {
- this._parent.releaseFunc("sKey");
- };
- this.qual = this._parent.inGameQuality;
- this.part = this._parent.particles;
- this.setSoundText = function()
- {
- if(this._parent.globalsoundcontrol == "play")
- {
- this.mStat = "(Currently On)";
- }
- else if(this._parent.globalsoundcontrol == "stop")
- {
- this.mStat = "(Currently Off)";
- }
- trace("options sound play: " + this._parent.soundPlay);
- if(this._parent.soundPlay == "true")
- {
- this.sStat = "(Currently On)";
- }
- else
- {
- this.sStat = "(Currently Off)";
- }
- };
- this.setSoundText();
-